package com.example.exam.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.exam.entity.ExamList;
import com.example.exam.entity.Testpaper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.mapstruct.Mapper;

/**
 * @author zhang
 */
@Mapper
public interface ExamMapper extends BaseMapper<Testpaper> {
    @Select("select id,paperName,startTime from testpaper where `to` in(select class_id from stuclass where user_id = #{id})")
    IPage<ExamList> getExamList(Page<?> page, @Param(value = "id") Integer id);
}
